package com.sfeir.server.core;

import java.util.List;

import javax.jdo.annotations.Element;
import javax.jdo.annotations.FetchGroup;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
@FetchGroup(name = "graph", members = { @Persistent(name = "graph") })
public class Indicator {

	@PrimaryKey
	@Persistent
	private String code;

	@Persistent(defaultFetchGroup = "true", dependent = "true")
	private Graph graph;
	
	@Persistent(defaultFetchGroup = "true")
	@Element(dependent = "true")
	private List<DataSet> dataSetList/* = new ArrayList<DataSet>()*/;

	public Indicator() {
	}

	public void setGraph(Graph graph) {
		this.graph = graph;
	}

	public Graph getGraph() {
		return graph;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getCode() {
		return code;
	}

	public void setDataSetList(List<DataSet> dataSetList) {
		this.dataSetList = dataSetList;
	}

	public List<DataSet> getDataSetList() {
		return dataSetList;
	}
}
